﻿<Window x:Class="WITD.WorkItemsList"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Destroy Work Items for team project: "
        Width="1110"
        Height="455"
        ResizeMode="NoResize"
        WindowStyle="ToolWindow">
    <Grid Width="1109"
          Height="432"
          HorizontalAlignment="Left"
          Background="#41000000">
        <Label Name="lblSelectedCout"
               Width="902"
               Height="28"
               Margin="6,325,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Content="" />
        <Button Name="btnClose"
                Width="181"
                Height="23"
                Margin="919,403,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnClose_Click"
                Content="Close"
                TabIndex="12"
                ToolTip="Close this window" />
        <Button Name="btnDestroy"
                Width="181"
                Height="23"
                Margin="919,326,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnDestroy_Click"
                Content="Destroy selected work items"
                TabIndex="11"
                ToolTip="Destroy all selected work items in the current project" />
        <Button Name="btnRefresh"
                Width="95"
                Height="23"
                Margin="6,403,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRefresh_Click"
                Content="Refresh"
                TabIndex="9"
                ToolTip="Refresh the cache and repopulate the list of work item types. If the sync fails, it reconnects to the collection." />
        <Button Name="btnRebuildcache"
                Width="125"
                Height="23"
                Margin="107,403,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRebuildcache_Click"
                Content="Rebuild cache"
                TabIndex="8"
                ToolTip="Rebuilds the cache using WITAdmin and repopulates the list of work item types. Use sparingly on production systems during business hours." />
        <TextBox Name="lblStatus"
                 Width="902"
                 Height="23"
                 Margin="6,371,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 AllowDrop="False"
                 BorderThickness="0"
                 IsReadOnly="True"
                 IsTabStop="False"
                 IsUndoEnabled="False">
            <TextBox.Background>
                <SolidColorBrush />
            </TextBox.Background>
        </TextBox>
        <Label Name="label1"
               Width="134"
               Height="25"
               Margin="2,2,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               BorderThickness="1"
               Content="Filter by WorkItemType: "
               IsHitTestVisible="False" />
        <ComboBox Name="cboWITD"
                  Width="206"
                  Height="23"
                  Margin="133,2,0,0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top"
                  Background="White"
                  Foreground="Black"
                  MouseEnter="cboWITD_MouseEnter"
                  MouseMove="cboWITD_MouseMove">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <CheckBox Name="chkChecked"
                                  Checked="Chk_Checked"
                                  Click="chk_Click"
                                  Content="{Binding Item.Name}"
                                  IsChecked="{Binding IsChecked,
                                                      Mode=TwoWay}"
                                  ToolTip="Check each Work Item Type Definition to include in the export/import."
                                  ToolTipService.ShowDuration="60000"
                                  Unchecked="Chk_Unchecked" />
                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <TextBox Name="lblWITDFilter"
                 Width="728"
                 Height="23"
                 Margin="372,3,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 VerticalContentAlignment="Center"
                 IsEnabled="False"
                 IsReadOnly="True" />
        <Button Name="btnRefreshFilter"
                Width="28"
                Height="23"
                Margin="341,2,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRefreshFilter_Click">
            <StackPanel Orientation="Vertical">
                <Image Height="16"
                       Margin="0,0,0,0"
                       Source="Resources/Images/RefreshArrow_Blue_16x16_72.png" />
            </StackPanel>
        </Button>
        <Label Name="lblWICount"
               Width="194"
               Height="28"
               Margin="241,402,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Content="" />
        <DataGrid Name="dgWorkItems"
                  Width="1100"
                  Height="288"
                  Margin="0,31,0,0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top"
                  AlternatingRowBackground="#96BEBFCE"
                  AreRowDetailsFrozen="True"
                  AutoGenerateColumns="False"
                  IsReadOnly="True"
                  SelectionChanged="WorkItems_SelectionChanged"
                  ToolTip="Work items in this project. Filter list using drop-down, above. Click column headers to sort.">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=Item.Id,
                                                      Mode=OneTime}"
                                    Header="Id"
                                    IsReadOnly="True"
                                    SortDirection="Ascending" />
                <DataGridTextColumn MinWidth="40"
                                    Binding="{Binding Path=Item.Title,
                                                      Mode=OneTime}"
                                    Header="Title"
                                    IsReadOnly="True" />
                <DataGridTextColumn Binding="{Binding Path=Item.State,
                                                      Mode=OneTime}"
                                    Header="State"
                                    IsReadOnly="True" />
                <DataGridTextColumn Binding="{Binding Path=Item.WorkItemType,
                                                      Mode=OneTime}"
                                    Header="Work Item Type"
                                    IsReadOnly="True" />
                <DataGridTextColumn Binding="{Binding Path=Item.LastUpdate,
                                                      Mode=OneTime}"
                                    Header="Last Update"
                                    IsReadOnly="True" />
                <DataGridTextColumn Binding="{Binding Path=Item.Assigned,
                                                      Mode=OneTime}"
                                    Header="Assigned To"
                                    IsReadOnly="True" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>

</Window>
